Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require-dev compatibility for Doctrine ORM 3 #2448

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

dmaicher
Copy link
Contributor

@dmaicher dmaicher commented Mar 17, 2024

Subject

I am targeting this branch, because its BC.

Part of sonata-project/dev-kit#2674

Changelog

### Added
- compatibility with ORM 3

@@ -14,7 +14,7 @@
</field>
<field name="width" column="width" type="integer" nullable="true"/>
<field name="height" column="height" type="integer" nullable="true"/>
<field name="length" column="length" type="decimal" nullable="true"/>
<field name="length" column="length" type="decimal" nullable="true" precision="10"/>
Copy link
Contributor Author

@dmaicher dmaicher Mar 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed with ORM 3. Otherwise will lead to

Doctrine\DBAL\Exception\InvalidColumnType\ColumnPrecisionRequired: Column precision is not specified

https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/reference/schema-representation.html#portable-options

says

Defaults to 10.

Still going to verify this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema create SQL

ORM 2 without specified precision: length NUMERIC(10, 0) DEFAULT NULL
ORM 3 with specified precision = 10: length NUMERIC(10, 0) DEFAULT NULL

So this change should keep BC

@dmaicher dmaicher marked this pull request as ready for review March 17, 2024 08:05
@dmaicher dmaicher requested a review from a team March 17, 2024 08:06
@VincentLanglet VincentLanglet merged commit 33b6cea into sonata-project:4.x Mar 17, 2024
24 checks passed
@dmaicher dmaicher deleted the orm_3 branch March 17, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants